package
{
	import flash.display.MovieClip;
	import flash.events.Event;
	import flash.text.TextField;

	public class MXP3Footer extends MovieClip
	{
		private const COPYRIGHT_INFO:String = "Copyright © 2010 Scott Ysebert/MXProjects.com. All rights reserved.";
		private const WEBSITE:String = "mxprojects.com";
		private const CREDITS:String = "Site Design by <u><a href=\"http://www.studiomox.com/public\" target=\"_blank\">Studio Mox</a></u>.<br>Hosting by <u><a href=\"http://www.sockit.ca\" target=\"_blank\">Sockit Solutions</a></u>.";
		
		public var background:MovieClip;
		public var copyright:TextField;
		public var website:TextField;
		public var credits:TextField;
		
		public function MXP3Footer()
		{				
			copyright.htmlText = COPYRIGHT_INFO;
			website.htmlText = WEBSITE;
			credits.htmlText = CREDITS;
			
			addEventListener(Event.ADDED_TO_STAGE, addToStage, false, 0, true);
		}
		
		private function addToStage(event:Event):void {
			//listen for stage resizing
			stage.addEventListener(Event.RESIZE, resizeBackground, false, 0, true);
			resizeBackground();
		}
		
		private function resizeBackground(event:Event = null):void {
			var wStage:int = stage.stageWidth;
			background.width = wStage;
		}
		
	}
}
